#include <iostream>
using namespace std;
#include <memory>
#include "lockguard.hpp"
#include "Log.hpp"
#include "Thread.hpp"
#include "threadpool.hpp"
#include "task.hpp"
#include<ctime>
int main()
{
    srand(1293999^327382^34&34345);
    threadpool<task>::GetInsTance()->Start();

    while (true)
    {
        int x = rand() % 10;
        usleep(rand() % 213);
        int y = rand() % 10;
        usleep(rand() % 213);
        char oper = opers[rand() % opers.size()];

        task t(x, y, oper);
        threadpool<task>::GetInsTance()->Push(t);  
        sleep(1);
    }

    threadpool<task>::GetInsTance()->WaitJoin();

    return 0;
}